export function selectTag(name) {
    let pass = {}
    var List = [
        { name: '近地铁', bgColor: '#ffdddc', color: '#D24959' },
        { name: '随时看房', bgColor: '#ffefdc', color: '#d88e35' },
        { name: '独立阳台', bgColor: '#dcf8ff', color: '#33b1d0' },
    ]
    List.forEach(item => {
        if (item.name == name) {
            pass = item
        }
    })
    return `background: ${pass.bgColor};color: ${pass.color};`
}

export function checkPhone(phone) {
    if (!(/^1[34578]\d{9}$/.test(phone))) {
        uni.showToast({
            title: "手机号码有误，请重填",
            duration: 1500
        });
        return false
    } else {
        return true
    }
}